package com.chen.demohystriyresttemplate.controller;

import com.chen.common.dto.ResponseResult;
import com.chen.demohystriyresttemplate.service.impl.DemoHystriyServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpMethod;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
@RequestMapping("/RestTemplateController")
public class DemoRestTemplate {

    @Autowired
    private DemoHystriyServiceImpl demoHystriyService;

    /**
     * 服务降级
     */
    @RequestMapping("/test")
    public void test1(){
        ResponseResult result = demoHystriyService.test("测试断融");
        System.out.println(result);

    }
}
